<html>

<head>
  <style>
    #smartTable {
      width: 400px;
      height: 400px;
      border: 1px solid gray;
      overflow: auto;
    }
    
    td {
      padding: 2px 10px;
    }
    
  </style>
  
  <script type="text/javascript" src="../smarttable.js" onerror="alert('error loading script!');"></script>

</head>

<body>

<button onclick="table.redraw();">Redraw</button>
<div id="smartTable"></div>

<script type="text/javascript">

var rows = 10000;
var defaultHeight = 24;

var data = [];
for (var i = 0; i < rows; i++) {
  data.push([i, 'bla bla', 'bladiebla']);
}

var options = {
  'defaultHeight': defaultHeight,
  'classNames': {
    'tr': 'table-tr',
    'td': 'table-td',
    'th': 'table-th'
  }
};

var container = document.getElementById('smartTable');
var table = new SmartTable(container);
table.setData(data, options);

</script>

</body>

</html>
